<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <!-- 1. 在遍历过程中没有使用索引值 -->
    <ul>
      <li v-for='name in names'>{{name}}</li>
    </ul>
    
    <!-- 2. 在遍历过程中获取索引值 -->
    <ul>
      <li v-for='(name, index) in names'>{{index+1}}-{{name}}</li>
    </ul>
  </div>

  <script src="../js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        names: ['ccc', 'KB', 'LJ', 'SC']
      }
    })
  </script>
</body>

</html>